import { defineStore } from 'pinia'
import { ref } from 'vue'
// THIS IS A TEMPLATE, DO NOT DELETE
export const useMessageStore = defineStore(
  'MsgStore',
  () => {
    const Msg = ref('')
    const setValue = (data) => {
      Msg.value = data
    }
    const getValue = () => {
      return Msg.value
    }
    return {
      setValue,
      getValue
    }
  },
  {
    persist: {
      enabled: true,
      strategies: [
        {
          key: 'MsgStore',
          storage: localStorage,
          paths: ['Message']
        }
      ]
    }
  }
)
